package cn.com.dcsgo.feign.fallback;

import cn.com.dcsgo.dto.CartInfoDTO;
import cn.com.dcsgo.feign.CartFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * CartFeignClient 兜底回调
 *
 * @author Dcsgo
 * @since 2025/11/18 12:59
 */
@Slf4j
@Component
public class CartFeignClientFallback implements CartFeignClient {
    @Override
    public List<CartInfoDTO> getBasketList(List<Long> basketIds) {
        log.error("RPC错误：远程调用购物车服务 getBasketList 接口失败，走了兜底回调");
        return new ArrayList<>(0);
    }

    @Override
    public boolean removeCartItem(String openid, List<Long> skuIds) {
        log.error("RPC错误：远程调用购物车服务 removeCartItem 接口失败，走了兜底回调");
        return false;
    }
}
